package com.lbs.jiepiaisi.base;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;

public class BaseResponseEntity<T> implements Serializable {

    @SerializedName("status")
    public int code = -1;

    @SerializedName("message")
    public String msg = "";

//    public T result;

    public int getCode() { return code; }
    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }
    public void setMsg(String msg) {
        this.msg = msg;
    }
//    public T getResult() { return result;}
//    public void setResult(T result) { this.result = result;}

//    companion object {
//        private const val serialVersionUID = 1L
//    }

    private static final long serialVersionUID = 1L;

    public boolean success() {
//        return ApiConfig.getSucceedCode() == code;
        return true;
    }

    public boolean tokenInvalid() {
//        return ApiConfig.getInvalidateToken() == code;
        return true;
    }
}
